import * as mongoose from 'mongoose';
import config from 'src/config/config';
const Schema = mongoose.Schema;
export const GoodsAttrSchema = new mongoose.Schema(
    {
        goods_id: { type: Schema.Types.ObjectId }, //查询商品拿到
        //备用字段 开始
        goods_cate_id: {
            //添加商品会传
            type: Schema.Types.ObjectId,
        },
        attribute_cate_id: {
            //添加商品会传数组，拿到遍历
            type: Schema.Types.ObjectId,
        },
        attribute_id: {
            type: Schema.Types.ObjectId,
        },
        attribute_type: {
            type: String,
        },
        //备用字段 结束

        attribute_title: {
            type: String,
        },
        attribute_value: {
            type: String,
        },
        status: { type: Number, default: 1 },
    },
    config.SchemaOptions,
);
